package main

import (
	"fmt"
	"image-cleaner/cmd"
	"os"

	"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
	Use:   "image-cleaner",
	Short: "清理和构建镜像的CLI工具",
	Long:  "一个优雅的清理镜像和构建镜像的CLI工具(*^▽^*)",
}

func init() {
	// 添加全局标志
	// rootCmd.PersistentFlags().BoolVarP(&dryRun, "dry-run", "n", false, "仅预览操作不执行真实删除")
	// rootCmd.PersistentFlags().BoolVarP(&interactive, "interactive", "i", false, "交互式确认每个操作")
	rootCmd.AddCommand(cmd.ClearCmd)
	rootCmd.AddCommand(cmd.DeleteCmd)
}

func main() {
	if err := rootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}
